package com.guyaogg.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guyaogg.common.utils.PageUtils;
import com.guyaogg.gulimall.product.entity.CategoryEntity;
import com.guyaogg.gulimall.product.vo.Catalog2VO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author guyao
 * @email 3039744913@qq.com
 * @date 2021-10-08 15:51:59
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查出所有分类，并以树形展示
     * @return
     */
    List<CategoryEntity> listWithTree();

    /**
     * 自定义删除
     * @param asList
     */
    void removeMenuByIds(List<Long> asList);
    /**
     * 找到 catelogId 的完整路径
     * @param catelogId  catelog 的 id
     * @return [父/子/孙]
     */
    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catalog2VO>> getCatalogJson();
}

